package net.xdclass.forum.domain;

import java.time.LocalDateTime;
import java.util.Date;

/*
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `phone` varchar(32) DEFAULT NULL,
 `pwd` varchar(128) DEFAULT NULL,
 `sex` int(2) DEFAULT NULL,
 `img` varchar(128) DEFAULT NULL,
 `create_time` datetime DEFAULT NULL,
 `role` int(11) DEFAULT NULL COMMENT '1是普通⽤户，2是管理员',
 `username` varchar(128) DEFAULT NULL,
 */
public class User {
    private int id;
    private String phone;
    private String pwd;
    private int sex;
    private String img;
    private LocalDateTime create_time;
    private int role;
    private String username;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public LocalDateTime getCreate_time() {
        return create_time;
    }

    public void setCreate_time(LocalDateTime create_time) {
        this.create_time = create_time;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", pwd='" + pwd + '\'' +
                ", sex=" + sex +
                ", img='" + img + '\'' +
                ", create_time=" + create_time +
                ", role=" + role +
                ", username='" + username + '\'' +
                '}';
    }
}
